﻿<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Hello, World</title>
		<style type="text/css">
			html{height:100%}
			body{height:100%;margin:0px;padding:0px}
			#container{height:100%}
			</style>
			<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
			<script type="text/javascript">
			var map=null;
			var vprelat="";
			var vprelng="";
			var marker=null;
			var vprepoint=null;
			function appendpoint(lng,lat)
			{				
				var vlat=lat/1000000;
				var vlng=lng/1000000;
				var point=new BMap.Point(lng/1000000,lat/1000000);
				//map.panTo(point);
				map.setCenter(point);
				if(vprepoint != null)
				{
					/*
					var polyline = new BMap.Polyline([  
   						vprepoint,  
   						point  
 							],{strokeColor:"blue", strokeWeight:5, strokeOpacity:0.5}  
							);  
							map.addOverlay(polyline);  
							*/
				}
				vprepoint=point;
				if(marker)
				{
					marker.setPosition(point);
				}else
				{
					var myIcon = new BMap.Icon("loading_circle.gif", new BMap.Size(16,16));
					marker = new BMap.Marker(point,{icon:myIcon});
					//marker = new BMap.Marker(point);
					map.addOverlay(marker);
				}
				
			}
			</script>
			</head> 
			<body><div id="container"></div>
				<script type="text/javascript">
					map = new BMap.Map("container");          // 创建地图实例var po
					var point = new BMap.Point(116.404, 39.915);//创建点坐标
					//var point = new BMap.Point(126.040383,90.040394);
					map.centerAndZoom(point, 15);// 初始化地图，设置中心点坐标和地图级别
				  map.addControl(new BMap.NavigationControl());  
					map.addControl(new BMap.ScaleControl());  
					map.addControl(new BMap.OverviewMapControl());  
					//map.addControl(new BMap.MapTypeControl()); 
				</script>
			</body>
</html>